<?php

   
    $conn= mysql_connect("localhost","root","root");

    mysql_select_db("postit");

    $q = mysql_query("INSERT INTO postit.user (username, password, surname, name, registrationDate, ranking, valutationsNumber) 
         VALUES('".$_POST['username']."', '".$_POST['password']."', '".$_POST['surname']."', '".$_POST['name']."', NOW(), 0, 0)")
;
    if (!$q || !$conn)
      
       print(json_encode(null_error));
  
   else 
       print(json_encode(ok));

  
   mysql_close();


?>

